<?php 
	$host = "127.0.0.1";
	$userName = "root";
	$pwd = "root";
	$dbName = "text";
	$dbms='mysql';
	$dsn="$dbms:host=$host;dbname=$dbName";
	try {
		$db = new PDO($dsn,'root','root');
		//echo "连接成功。";
	} catch (Exception $exc) {
		//echo $exc->getMassage();
	}
	$db->query('set names utf8');
	$sql = "INSERT INTO `class`(`name`,`tea`, `checkID`) VALUES ('".$_POST['name']."','".$_POST['tea']."',0)";
	$db->query($sql);
	exit();
?>